Repository navigation
Document and expose API warnings - #36
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MiniCodeMonkey
approved these changes
Oct 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The Geocodio API reports non-fatal advisories under a
_warningskey, for example a misspelled field name, an unexpected query parameter, a superseded API version, or an append that had to be skipped. Until now, the only way to get at them wasGeocodingResponse.raw, and list and distance matrix job responses dropped them completely.Changes
GeocodingResponse,GeocodingResult,ListResponse,DistanceJobResponseandPaginatedResponsenow have awarnings: List[str]field, which is empty when the API sent none.GeocodingResult.warningsholds the warnings for its own query plus the result's own warnings.GeocodingResponse.warningsholds every warning from the batch, with duplicates removed.GeocodioError.warnings(backed byGeocodioErrorDetail.warnings) exposes warnings attached to error responses. The new constructor argument is optional, so existing code keeps working.tests/unit/test_warnings.py, which covers every response shape, error responses, and non-JSON error bodies.All new fields have defaults, so this change is backwards compatible.
🤖 Generated with Claude Code